﻿using UnityEngine;
using System.Collections;
using UnityEngine.UI;

public class Selection : MonoBehaviour {

	public Image _image;

	public Sprite _notSelected;

	public Sprite _selected;

	public Sprite _highlighted;

	public enum IsSelected {
		notSelected, selected, highlighted
	}

	private IsSelected mIsSelected = IsSelected.selected;

	// Use this for initialization
	void Start () {
	
	}
	
	// Update is called once per frame
	void Update () {

	}

	public bool isSelected() {
		return mIsSelected == IsSelected.selected;
	}

	public bool isHighlighted() {
		return mIsSelected == IsSelected.highlighted;
	}

	public void Select() {
		mIsSelected = IsSelected.selected;
		_image.sprite = _selected;
	}

	public void Unselect() {
		mIsSelected = IsSelected.notSelected;
		_image.sprite = _notSelected;
	}

	public void Highlight() {
		mIsSelected = IsSelected.highlighted;
		_image.sprite = _highlighted;
	}

}
